import axios from 'axios';

// 定义请求 view 接口的函数
export const getViewData = async () => {
  try {
    const response = await axios.get('/view');
    return response.data;
  } catch (error) {
    console.error('请求 view 接口出错:', error);
    throw error;
  }
};